using System;

namespace SBPweb.Logging
{
    /// <summary>
    /// Log file name provider interface. Implement it to develop custom name providers those can be referenced from logging configuration block.
    /// Check out <see cref="Log4NetNameProvider"/> for sample implementation.
    /// </summary>
    /// <remarks>
    /// Using it from the configuration of the logging application block:
    /// You may put references onto instances of classes those implement this interface using the NameProviderAssembly and NameProviderType attributes of EntLib trace listener instance definitions.
    /// </remarks>
    /// <example>
    /// The follwoing example demonstrates a sample application configuration tag.
    /// <![CDATA[
    /// 
    /// <add
    ///  Folder="c:\" ArchiveFolder="c:\Archive\" ArchivingMethod="1"
    ///  MaxAllowedAge="604800" AutoArchivingInterval="86400" NameProviderAssembly="EntLib.dll"
    ///  NameProviderType="SBPweb.Logging.Log4NetNameProvider" Append="true"
    ///  listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
    ///  traceOutputOptions="None" type="SBPweb.Logging.LogXmlTraceListener, EntLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
    ///  name="LogXmlTraceListener" initializeData="" formatter="LogXmlFormatter"
    /// />
    /// ]]>
    /// </example>
	public interface ILogNameProvider
    {
        /// <summary>
        /// Generates a log file name which must be a valid absolute path and not existing.
        /// </summary>
        /// <param name="LogFolder">The <see cref="LogFolder"/> to use as destination folder.</param>
        /// <returns>Absolute file name.</returns>
        String GenerateName(LogFolder LogFolder);
    }
}